/**
 *
 * @param {import('webpack').Compiler} compiler
 */
module.exports = function (compiler) {
  const name = '个人测试 TestCompilerPlugin';

  compiler.hooks.environment.tap(name, () => {
    console.log('========= environment');
  });
  compiler.hooks.afterEnvironment.tap(name, () => {
    console.log('========= afterEnvironment');
  });
  compiler.hooks.entryOption.tap(name, (context, entry) => {
    console.log('========= entryOption');
  });
  compiler.hooks.afterPlugins.tap(name, (compiler) => {
    console.log('========= afterPlugins');
  });
  compiler.hooks.afterResolvers.tap(name, (compiler) => {
    console.log('========= afterResolvers');
  });
  compiler.hooks.initialize.tap(name, () => {
    console.log('========= initialize');
  });
};
